# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libpciaccess
pkgver=0.17
pkgrel=2
pkgdesc="X11 PCI access library"
url="https://xorg.freedesktop.org/"
arch="all"
license="X11"
options="!check"  # No test suite.
depends="hwdata-pci"
makedepends="meson util-macros"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.x.org/releases/individual/lib/libpciaccess-$pkgver.tar.xz
	lfs64.patch
	"

build() {
	abuild-meson \
		-Db_lto=true \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
8484605c66ef18c8d8a3e029a6d33e26fcaa450c1263790d89ac8b0a160ffb2dfceaa6140ac9ad7d8087283ecbec8ac801f757e44890d547c3cbecd2c922ca47  libpciaccess-0.17.tar.xz
1cf05ff44b67ff804fb06b2cee65f9943c77b99b1784acbd0d117643d380919ba9b92a6b9bf60e38fa0a04736656dbccef26442cf14f29480f55d246136e2f8f  lfs64.patch
"
